let mixin = {
  watch: {
    // "queryParams.managementName"(newVal) {
    //   if (/[\u4E00-\u9FFF]+/.test(newVal)) {
    //     let option = this.options.find(option => option.label === newVal);
    //     this.queryParams.managementName = option.value;
    //   }
    // },
    // "queryParams.powerMode"(newVal) {
    //   if (/[\u4E00-\u9FFF]+/.test(newVal)) {
    //     let option = this.options.find(option => option.label === newVal);
    //     this.queryParams.powerMode = option.value;
    //   }
    // }
  },
  methods: {
    clickExample(e) {
      let textContent = e.target.parentNode.textContent;
      console.log("textContent", textContent);
      let textContentArr = textContent
        .match(/(?<=:)\s?"?-?(\d+\.\d+|[-a-zA-Z0-9]+|\d+|[\u4E00-\u9FFF]+)"?/g)
        .map(item => item.replaceAll(/\'|\"/g, ""));
      console.log("textContentArr", textContentArr);
      if (this.project) {
        Object.keys(this.project).forEach((item, idx) =>
        this.$set(this.project, item, textContentArr[idx])
      );
      } else {
        Object.keys(this.queryParams).forEach((item, idx) =>
        this.$set(this.queryParams, item, textContentArr[idx])
      );
      }

    }
  }
};

export default mixin;
